package ws.performancetest.tests.synchronization.db;

import java.io.Serializable;
import ws.performancetest.tests.synchronization.enumaration.RamUnit;

/**
 * This class represents the machine specifications for the host.
 *
 * @author Wilson Santos, 36228 <wilson.santos@ua.pt>
 */
public class DBHost implements Serializable {

  /** Machine identification. */
  private Integer ID = -1;
  /** Machine name. */
  private String name = "";
  /** String describing the machine. */
  private String description = "";
  /** String describing the CPU. */
  private String CPU = "";
  /* Machine amount of RAM. */
  private float RAM_value = 0f;
  /* RAM unit. */
  private RamUnit RAM_unit = RamUnit.GB;
  private Integer OSId = -1;
  /* 
   * String describing the database settings. It may descrive de JDBC driver, if
   * this machine is a host, or it may describe the DBMS if it is a server.
   */
  private String dbInfo;

  public DBHost() {
  }

  public DBHost(Integer ID, String name, String description, String CPU, float RAM_value, RamUnit RAM_unit, Integer OSId, String dbInfo) {
    this.ID = ID;
    this.name = name;
    this.description = description;
    this.CPU = CPU;
    this.RAM_value = RAM_value;
    this.RAM_unit = RAM_unit;
    this.OSId = OSId;
    this.dbInfo = dbInfo;
  }

  public Integer getOSId() {
    return OSId;
  }

  public void setOSId(Integer OSId) {
    this.OSId = OSId;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public Integer getID() {
    return ID;
  }

  public String getDbInfo() {
    return dbInfo;
  }

  public String getCPU() {
    return CPU;
  }

  public RamUnit getRAM_unit() {
    return RAM_unit;
  }

  public float getRAM_value() {
    return RAM_value;
  }

  public String getDescription() {
    return description;
  }

  public void setCPU(String CPU) {
    this.CPU = CPU;
  }

  public void setID(Integer ID) {
    this.ID = ID;
  }

  public void setRAM_unit(RamUnit RAM_unit) {
    this.RAM_unit = RAM_unit;
  }

  public void setRAM_value(float RAM_value) {
    this.RAM_value = RAM_value;
  }

  public void setDbInfo(String dbInfo) {
    this.dbInfo = dbInfo;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  @Override
  public String toString() {
    return name;
  }

}
